/**
 * Created by Administrator on 2017/3/9.
 */
var Pagination = require('../../../src/libs/pagination');

var Root = React.createClass({
    getInitialState: function(){
        return {
            pageVal: PageDM.pagination.value
        }
    },
    pageClick:function (v) {
        PageDM.pagination.setValue({curPage:v});
        PageDM.pagination.onClick(v);
    },
    componentDidMount: function(){
        UEventHub.emit("pageLoad","hello world!");
        var _this = this;

    },
    render:function(){
        var _this = this;
        return(
            <div>
                <Pagination  pageVal={_this.state.pageVal} onClick={this.pageClick}></Pagination>
            </div>
        )
    }
});
ReactDOM.render(<Root/>, document.getElementById('main'));